<!--suppress ALL -->
<include file="./Template/header.html" />

<link rel="stylesheet" type="text/css" href="/Template/css/exam.css?v=1">
<script type="text/javascript" src="/Template/js/amazeui.js"></script>
<script type="text/javascript">


    $(function() {

        //初始化页面配置
        initPage("物理检查");

//        $("#pronationCheck input[type='checkbox']").click(function() {
//            lert(113);
//            if($(this).is(":checked")){
//                alert(123);
//            }
//        });
        $("textarea").keypress(function(e) {
            if (e.which == 13) {
                return false;
            }
        });


        var app = new Vue({
            el: '#container',
            data: {
            },
            methods: {
                cancel: function() {
                    window.location.href = "/wechat/workorder/index/id/{$workorderId}";
                },
                save: function() {

                    var examBasicCPId = $("input[name=examBasicCPId]").val();
                    var workorderId = $("input[name=workorderId]").val();
                    var ms01 = $("select[name=ms01]").val();
                    var ms02 = $("select[name=ms02]").val();
                    var ms03 = $("select[name=ms03]").val();
                    var ms04 = $("select[name=ms04]").val();
                    var ms05 = $("select[name=ms05]").val();
                    var ms06 = $("select[name=ms06]").val();
                    var ms07 = $("select[name=ms07]").val();
                    var ms08 = $("select[name=ms08]").val();
                    var ms09 = $("select[name=ms09]").val();
                    var ms10 = $("select[name=ms10]").val();
                    var mt01 = $("select[name=mt01]").val();
                    var mt02 = $("select[name=mt02]").val();
                    var mt03 = $("select[name=mt03]").val();
                    var mt04 = $("select[name=mt04]").val();
                    var mt05 = $("select[name=mt05]").val();
                    var mt06 = $("select[name=mt06]").val();
                    var mt07 = $("select[name=mt07]").val();
                    var mt08 = $("select[name=mt08]").val();
                    var mt09 = $("select[name=mt09]").val();
                    var mt10 = $("select[name=mt10]").val();
                    var mt11 = $("select[name=mt11]").val();
                    var mt12 = $("select[name=mt12]").val();
                    var mt13 = $("select[name=mt13]").val();
                    var mt14 = $("select[name=mt14]").val();
                    var jr01 = $("input[name=jr01]").val();
                    var jr02 = $("input[name=jr02]").val();
                    var jr03 = $("input[name=jr03]").val();
                    var jr04 = $("input[name=jr04]").val();
                    var jr05 = $("input[name=jr05]").val();
                    var jr06 = $("input[name=jr06]").val();
                    var jr07 = $("input[name=jr07]").val();
                    var jr08 = $("input[name=jr08]").val();
                    var jr09 = $("input[name=jr09]").val();
                    var jr10 = $("input[name=jr10]").val();
                    var jr11 = $("input[name=jr11]").val();
                    var jr12 = $("input[name=jr12]").val();
                    var sk01 = $("input[name=sk01]").val();
                    var sk02 = $("input[name=sk02]").val();
                    var fp01 = $("input[name=fp01]").val();
                    var b01 = $("textarea[name=b01]").val().replace(/[\r\n]/g,"");
                    var b02 = $("textarea[name=b02]").val().replace(/[\r\n]/g,"");
                    var b03 = $("textarea[name=b03]").val().replace(/[\r\n]/g,"");
                    var b04 = $("textarea[name=b04]").val().replace(/[\r\n]/g,"");

                    var completed = "1";
                    if(isNullOrEmpty(ms01 &&
                        ms02&&
                        ms03&&
                        ms04&&
                        ms05&&
                        ms06&&
                        ms07&&
                        ms08&&
                        ms09&&
                        ms10&&
                        mt01&&
                        mt02&&
                        mt03&&
                        mt04&&
                        mt05&&
                        mt06&&
                        mt07&&
                        mt08&&
                        mt09&&
                        mt10&&
                        mt11&&
                        mt12&&
                        mt13&&
                        mt14&&
                        jr01&&
                        jr02&&
                        jr03&&
                        jr04&&
                        jr05&&
                        jr06&&
                        jr07&&
                        jr08&&
                        jr09&&
                        jr10&&
                        jr11&&
                        jr12&&
                        sk01&&
                        sk02&&
                        fp01&&
                        b01&&
                        b02&&
                        b03&&
                        b04
                        )) {
                        completed = "-1";
                    }
                    $.ajax({
                        url:"/wechat/workorder/examBasicCPPost",
                        type:"post",
                        data:{
                            examBasicCPId: examBasicCPId,
                            workorderId: workorderId,
                            ms01:ms01,
                            ms02:ms02,
                            ms03:ms03,
                            ms04:ms04,
                            ms05:ms05,
                            ms06:ms06,
                            ms07:ms07,
                            ms08:ms08,
                            ms09:ms09,
                            ms10:ms10,
                            mt01:mt01,
                            mt02:mt02,
                            mt03:mt03,
                            mt04:mt04,
                            mt05:mt05,
                            mt06:mt06,
                            mt07:mt07,
                            mt08:mt08,
                            mt09:mt09,
                            mt10:mt10,
                            mt11:mt11,
                            mt12:mt12,
                            mt13:mt13,
                            mt14:mt14,
                            jr01:jr01,
                            jr02:jr02,
                            jr03:jr03,
                            jr04:jr04,
                            jr05:jr05,
                            jr06:jr06,
                            jr07:jr07,
                            jr08:jr08,
                            jr09:jr09,
                            jr10:jr10,
                            jr11:jr11,
                            jr12:jr12,
                            sk01:sk01,
                            sk02:sk02,
                            fp01:fp01,
                            b01:b01,
                            b02:b02,
                            b03:b03,
                            b04:b04,

                            completed:completed,
                        },

                        dataType:"JSON",
                        beforeSend:function(){
                            $("#loadingToast").show();
                        },
                        complete:function(){
                            $('#loadingToast').hide();
                        },
                        success:function(data){
                            if(data.code == 200) {
//                                alert(data.alert);
                                alert("保存成功");
                                window.location.href = "/wechat/workorder/index/id/{$workorderId}";
                            }
                        },
                    })

                }
            }
        })
        $(".item select").change(function() {
            var value = $(this).find("option:selected").text();
            $(this).prev().val(value);
        });
    })

</script>

<div class="container" id="container">
    <div class="hint-info">
        <span class="update_time">{$formDict.update_time}：{$examBasicCP.update_time}</span>
        <span class="employee_name">{$formDict.update_name}：{$employeeName}</span>
    </div>
    <div class="edit-info">
        <div class="edit-content" >
            <input type="text" style="display: none;" name="workorderId" value="{$workorderId}">
            <input type="text" style="display: none;" name="examBasicCPId" value="{$examBasicCPId}">
        </div>
        <div class="item" style="border-bottom:0px">
            <span style="width: 100%; margin-left: 15%">—— 肌力(0、1、2、3、4、5级) ——</span>
        </div>
        <div class="item" style="border-bottom:0px">
            <span>髋伸肌：</span>
            <input id="ms01" type="text" value="{$examBasicCP.ms01}" readonly placeholder="请选择">
            <select name="ms01">
                <option value="{$examBasicCP.ms01}">请选择</option>
                {:getFormDictSelectOption($examBasicCP['ms01'],'ms','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>髋屈肌：</span>
            <input id="ms02" type="text" value="{$examBasicCP.ms02}" readonly placeholder="请选择">
            <select name="ms02">
                <option value="{$examBasicCP.ms02}">请选择</option>
                {:getFormDictSelectOption($examBasicCP['ms02'],'ms','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>髋内收肌：</span>
            <input id="ms03" type="text" value="{$examBasicCP.ms03}" readonly placeholder="请选择">
            <select name="ms03">
                <option value="{$examBasicCP.ms03}">请选择</option>
                {:getFormDictSelectOption($examBasicCP['ms03'],'ms','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>髋外展肌：</span>
            <input id="ms04" type="text" value="{$examBasicCP.ms04}" readonly placeholder="请选择">
            <select name="ms04">
                <option value="{$examBasicCP.ms04}">请选择</option>
                {:getFormDictSelectOption($examBasicCP['ms04'],'ms','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>髋内旋肌：</span>
            <input id="ms05" type="text" value="{$examBasicCP.ms05}" readonly placeholder="请选择">
            <select name="ms05">
                <option value="{$examBasicCP.ms05}">请选择</option>
                {:getFormDictSelectOption($examBasicCP['ms05'],'ms','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>髋外旋肌：</span>
            <input id="ms06" type="text" value="{$examBasicCP.ms06}" readonly placeholder="请选择">
            <select name="ms06">
                <option value="{$examBasicCP.ms06}">请选择</option>
                {:getFormDictSelectOption($examBasicCP['ms06'],'ms','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>股四头肌：</span>
            <input id="ms07" type="text" value="{$examBasicCP.ms07}" readonly placeholder="请选择">
            <select name="ms07">
                <option value="{$examBasicCP.ms07}">请选择</option>
                {:getFormDictSelectOption($examBasicCP['ms07'],'ms','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>腘绳肌：</span>
            <input id="ms08" type="text" value="{$examBasicCP.ms08}" readonly placeholder="请选择">
            <select name="ms08">
                <option value="{$examBasicCP.ms08}">请选择</option>
                {:getFormDictSelectOption($examBasicCP['ms08'],'ms','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>胫前肌：</span>
            <input id="ms09" type="text" value="{$examBasicCP.ms09}" readonly placeholder="请选择">
            <select name="ms09">
                <option value="{$examBasicCP.ms09}">请选择</option>
                {:getFormDictSelectOption($examBasicCP['ms09'],'ms','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item">
            <span>小腿三头肌：</span>
            <input id="ms10" type="text" value="{$examBasicCP.ms10}" readonly placeholder="请选择">
            <select name="ms10">
                <option value="{$examBasicCP.ms10}">请选择</option>
                {:getFormDictSelectOption($examBasicCP['ms10'],'ms','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>

        <div class="item" style="border-bottom:0px">
            <span style="width: 100%; margin-left: 15%">—— 肌张力(0、1、1+、2、3、4级) ——</span>
        </div>
        <div class="item" style="border-bottom:0px">
            <span>髋伸肌：</span>
            <input id="mt01" type="text" value="{$examBasicCP.mt01}" readonly placeholder="请选择">
            <select name="mt01">
                <option value="{$examBasicCP.mt01}">请选择</option>
                {:getFormDictSelectOption($examBasicCP['mt01'],'mt','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>髋屈肌：</span>
            <input id="mt02" type="text" value="{$examBasicCP.mt02}" readonly placeholder="请选择">
            <select name="mt02">
                <option value="{$examBasicCP.mt02}">请选择</option>
                {:getFormDictSelectOption($examBasicCP['mt02'],'mt','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>髋内收肌：</span>
            <input id="mt03" type="text" value="{$examBasicCP.mt03}" readonly placeholder="请选择">
            <select name="mt03">
                <option value="{$examBasicCP.mt03}">请选择</option>
                {:getFormDictSelectOption($examBasicCP['mt03'],'mt','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>髋外展肌：</span>
            <input id="mt04" type="text" value="{$examBasicCP.mt04}" readonly placeholder="请选择">
            <select name="mt04">
                <option value="{$examBasicCP.mt04}">请选择</option>
                {:getFormDictSelectOption($examBasicCP['mt04'],'mt','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>髋内旋肌：</span>
            <input id="mt05" type="text" value="{$examBasicCP.mt05}" readonly placeholder="请选择">
            <select name="mt05">
                <option value="{$examBasicCP.mt05}">请选择</option>
                {:getFormDictSelectOption($examBasicCP['mt05'],'mt','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>髋外旋肌：</span>
            <input id="mt06" type="text" value="{$examBasicCP.mt06}" readonly placeholder="请选择">
            <select name="mt06">
                <option value="{$examBasicCP.mt06}">请选择</option>
                {:getFormDictSelectOption($examBasicCP['mt06'],'mt','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>股四头肌：</span>
            <input id="mt07" type="text" value="{$examBasicCP.mt07}" readonly placeholder="请选择">
            <select name="mt07">
                <option value="{$examBasicCP.mt07}">请选择</option>
                {:getFormDictSelectOption($examBasicCP['mt07'],'mt','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>腘绳肌：</span>
            <input id="mt08" type="text" value="{$examBasicCP.mt08}" readonly placeholder="请选择">
            <select name="mt08">
                <option value="{$examBasicCP.mt08}">请选择</option>
                {:getFormDictSelectOption($examBasicCP['mt08'],'mt','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>胫前肌：</span>
            <input id="mt09" type="text" value="{$examBasicCP.mt09}" readonly placeholder="请选择">
            <select name="mt09">
                <option value="{$examBasicCP.mt09}">请选择</option>
                {:getFormDictSelectOption($examBasicCP['mt09'],'mt','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>小腿三头肌：</span>
            <input id="mt10" type="text" value="{$examBasicCP.mt10}" readonly placeholder="请选择">
            <select name="mt10">
                <option value="{$examBasicCP.mt10}">请选择</option>
                {:getFormDictSelectOption($examBasicCP['mt10'],'mt','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>腓肠肌：</span>
            <input id="mt11" type="text" value="{$examBasicCP.mt11}" readonly placeholder="请选择">
            <select name="mt11">
                <option value="{$examBasicCP.mt11}">请选择</option>
                {:getFormDictSelectOption($examBasicCP['mt11'],'mt','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>比目鱼肌：</span>
            <input id="mt12" type="text" value="{$examBasicCP.mt12}" readonly placeholder="请选择">
            <select name="mt12">
                <option value="{$examBasicCP.mt12}">请选择</option>
                {:getFormDictSelectOption($examBasicCP['mt12'],'mt','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>踝阵挛：</span>
            <input id="mt13" type="text" value="{$examBasicCP.mt13}" readonly placeholder="请选择">
            <select name="mt13">
                <option value="{$examBasicCP.mt13}">请选择</option>
                {:getFormDictSelectOption($examBasicCP['mt13'],'mt','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item">
            <span>托马斯试验：</span>
            <input id="mt14" type="text" value="{$examBasicCP.mt14}" readonly placeholder="请选择">
            <select name="mt14">
                <option value="{$examBasicCP.mt14}">请选择</option>
                {:getFormDictSelectOption($examBasicCP['mt14'],'mt','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>

        <div class="item" style="border-bottom:0px">
            <span style="width: 100%; margin-left: 20%">—— 关节活动范围(髋关节角度) ——</span>
        </div>
        <div class="item" style="border-bottom:0px"><span>屈曲(0-125)：</span><input name="jr01" type="text" value="{$examBasicCP.jr01}" placeholder="请输入"></div>
        <div class="item" style="border-bottom:0px"><span>伸直(0-15)：</span><input name="jr02" type="text" value="{$examBasicCP.jr02}" placeholder="请输入"></div>
        <div class="item" style="border-bottom:0px"><span>内收(0-45)：</span><input name="jr03" type="text" value="{$examBasicCP.jr03}" placeholder="请输入"></div>
        <div class="item" style="border-bottom:0px"><span>外展(0-30)：</span><input name="jr04" type="text" value="{$examBasicCP.jr04}" placeholder="请输入"></div>
        <div class="item" style="border-bottom:0px"><span>内旋(0-45)：</span><input name="jr05" type="text" value="{$examBasicCP.jr05}" placeholder="请输入"></div>
        <div class="item"><span>外旋(0-45)：</span><input name="jr06" type="text" value="{$examBasicCP.jr06}" placeholder="请输入"></div>

        <div class="item" style="border-bottom:0px">
            <span style="width: 100%; margin-left: 20%">—— 关节活动范围(膝关节角度) ——</span>
        </div>
        <div class="item" style="border-bottom:0px"><span>屈曲(0-120)：</span><input name="jr07" type="text" value="{$examBasicCP.jr07}" placeholder="请输入"></div>
        <div class="item"><span>伸直(0-10)：</span><input name="jr08" type="text" value="{$examBasicCP.jr08}" placeholder="请输入"></div>

        <div class="item" style="border-bottom:0px">
            <span style="width: 100%; margin-left: 20%">—— 关节活动范围(踝关节角度) ——</span>
        </div>
        <div class="item" style="border-bottom:0px"><span>跖屈：</span><input name="jr09" type="text" value="{$examBasicCP.jr09}" placeholder="请输入"></div>
        <div class="item" style="border-bottom:0px"><span>背伸R1(伸膝时)：</span><input name="jr10" type="text" value="{$examBasicCP.jr10}" placeholder="请输入"></div>
        <div class="item" style="border-bottom:0px"><span>背伸R2(伸膝时)：</span><input name="jr11" type="text" value="{$examBasicCP.jr11}" placeholder="请输入"></div>
        <div class="item"><span>背伸R2(屈膝时)：</span><input name="jr12" type="text" value="{$examBasicCP.jr12}" placeholder="请输入"></div>

        <div class="item" style="border-bottom:0px">
                <span style="width: 100%; margin-left: 20%">—— 直膝抬腿试验(屈髋90°) ——</span>
        </div>
        <div class="item" style="border-bottom:0px"><span>腘窝角单侧：</span><input name="sk01" type="text" value="{$examBasicCP.sk01}" placeholder="请输入"></div>
        <div class="item"><span>腘窝角双侧：</span><input name="sk02" type="text" value="{$examBasicCP.sk02}" placeholder="请输入"></div>
        <div class="item" style="border-bottom:0px">
            <span style="width: 100%; margin-left: 20%">—— 足部位置(非负重) ——</span>
        </div>

        <div class="item" style="border-bottom:0px"><span>足偏角TFA：</span><input name="fp01" type="text" value="{$examBasicCP.fp01}" placeholder="请输入"></div>

        <div class="item" style="border-bottom:0px">
            <span style="margin-left: 35%">—— 平衡 ——</span>
        </div>
        <div class="item" style="border-bottom:0px">
            <span>坐立位(静态)：</span>
            <textarea class="t-area" style="height: 5rem" name="b01" maxlength="60" placeholder="请输入">{$examBasicCP.b01}</textarea>
        </div>
        <div class="item" style="border-bottom:0px">
            <span>坐立位(动态)：</span>
            <textarea class="t-area" style="height: 5rem" name="b02" maxlength="60" placeholder="请输入">{$examBasicCP.b02}</textarea>
        </div>
        <div class="item" style="border-bottom:0px">
            <span>站立位(静态)：</span>
            <textarea class="t-area" style="height: 5rem" name="b03" maxlength="60" placeholder="请输入">{$examBasicCP.b03}</textarea>
        </div>
        <div class="item" style="border-bottom:0px">
            <span>站立位(动态)：</span>
            <textarea class="t-area" style="height: 5rem" name="b04" maxlength="60" placeholder="请输入">{$examBasicCP.b04}</textarea>
        </div>

    </div>
    <div class="operation-btn">
        <div class="cancle-btn" v-on:click="cancel">取消</div>
        <if condition="$workorder['status'] lt '2' && $workorder['creator_id'] eq $customerId">
           <div class="save-btn" v-on:click="save">保存</div>
            <elseif condition="$workorder['status'] lt '3' && $job[0] eq 100"/>
            <div class="save-btn" v-on:click="save">保存</div>
        </if>
        <!--if condition="$workorder['status'] eq '2' && $workorder['examinator_id'] eq $customerId">
            <div class="save-btn" v-on:click="save">保存</div>
        </if-->

    </div>

</div>
<include file="./Template/footer.html" />